package think.in.spring.bean;

import think.in.spring.ioc.overview.domain.User;
import lombok.Getter;

/**
 * 定义保存User对象
 * @see  think.in.spring.ioc.overview.domain.User
 */

//@lombok.AllArgsConstructor
//@lombok.NoArgsConstructor
@Getter
public class UserHolder {

    private User user;
    public UserHolder(){}
    public UserHolder(User user) {
        this.user = user;
    }

    public void setUser(User user) {
        System.out.println("setUser方法注入" + user.toString());
        this.user = user;
    }
}
